import { Link, useHistory, history } from 'umi';
import { FC } from 'react';

const Index: FC = () => {
  // const history = useHistory();
  const jump = (): void => {
    history.push('/about');
  };

  return (
    <>
      <h1>这是index页面</h1>
      {/* 声明式跳转 */}
      {/* <Link to="/about">跳转</Link> */}
      {/* 命令式跳转 */}
      <button onClick={jump}>跳转</button>
    </>
  );
};

export default Index;
